﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using Microsoft.Xna.Framework.Graphics;

namespace ModelViewer
{
    public partial class AboutDlg : Form
    {
        /// <summary>
        /// The model viewer control for this component
        /// </summary>
        ModelViewerControl control = null;

        public AboutDlg(ModelViewerControl control)
        {
            this.control = control;
            InitializeComponent();
        }

        private void AboutDlg_Load(object sender, EventArgs e)
        {
            // Get the version of the executing assembly (that is, this assembly).
            Assembly assem = Assembly.GetEntryAssembly();
            AssemblyName assemName = assem.GetName();
            Version ver = assemName.Version;

            labelVersion.Text = String.Format("{0}.{1}.{2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision);
            switch(control.GraphicsDevice.GraphicsProfile)
            {
                case GraphicsProfile.HiDef:
                    labelProfile.Text = "HiDef";
                    break;

                case GraphicsProfile.Reach:
                    labelProfile.Text = "HiDef";
                    break;
            }
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }


    }
}
